<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui"
    xmlns:f="http://java.sun.com/jsf/core"
    template="/mytemplate.xhtml">
    
    <ui:define name="metadata">
    </ui:define>
    <ui:define name="content">
        <h3><h:outputLabel value="Create caple page"></h:outputLabel></h3>
        <br />
        <h:form prependId="false">
            <p:growl id="growl" showDetail="true" sticky="true" />  
            <h:panelGrid columns="2">
            	<h:outputLabel value="Cable Name: "/>
                <p:inputText value="#{createCableService.currentCable.name}"/>

                <h:outputLabel  value="Cable type: " />
                <p:selectOneMenu id="template" value="#{createCableService.currentCable.type}" >                 	 
                    <f:selectItems value="#{createCableService.types}" />                 	  
                </p:selectOneMenu> 

                <h:outputLabel  value="Count of wires: " />
                <p:inputText value="#{createCableService.countWires}"/>
            </h:panelGrid>
            <p:commandButton value="Create Cable" action="#{createCableService.createCable}"   
                             ajax="false" />
            <br></br>
            <br></br>
            
        </h:form>
    </ui:define>
</ui:composition>